import request from '@/utils/request'

// 查询企业部门
export const getDepartmentList = () => {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
// 新增部门
export const addDepartment = (data) => {
  return request({
    url: '/company/department',
    method: 'post',
    data

  })
}
// 删除部门
export const delDepartment = (id) => {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'

  })
}
// 根据id查询部门详情
export const getDepartmentId = (id) => {
  return request({
    url: `/company/department/${id}`,
    method: 'GET'

  })
}
// 根据id修改部门详情
export const editDepartmentId = (data) => {
  return request({
    url: `company/department/${data.id}`,
    method: 'put',
    data

  })
}
